from urllib.parse import urlencode

import requests

url = "https://op.juhe.cn/vercode/index"
appkey = "XXXXXXX"
testimage = "image.jpg"
codetype = "2003"
dtype = "json"

params = {
    "key": appkey,
    "codeType": codetype,
    "image": testimage,
    "dtype": dtype,
}
params = urlencode(params)
f = requests.post(url=url, data=params)
